/*package com.vcredit.creditcat.time;

import java.util.Date;
import java.util.List;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.scheduling.quartz.QuartzJobBean;

import com.alibaba.dubbo.common.threadpool.RequestLocalThread;
import com.vcredit.creditcat.manager.TimeManager;
import com.vcredit.creditcat.model.CustProductApply;
import com.vcredit.framework.quartz.QuartzJob;
import com.vcredit.framework.util.ConcurrentDateUtil;

*//**
 * 贷款产品结果查询任务
 **//*
@QuartzJob(name = "productQueryLimitTime", cron = "0 0/10 * * * ?")
public class ProductQueryLimitTime extends QuartzJobBean {
	private static Logger log = LoggerFactory.getLogger(ProductQueryLimitTime.class);

	@Autowired
	private TimeManager<CustProductApply> timeManager;

	@Autowired
	private ThreadPoolTaskExecutor threadPoolTaskExecutor;

	@Override
	protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException {
		log.info("贷款申请结果查询定时任务执行了................" + ConcurrentDateUtil.formatDateTime(new Date()));
		RequestLocalThread.create();
		List<CustProductApply> list = null;
		try {
			list = timeManager.findUnCrawl(CustProductApply.class);
			if (list == null || list.isEmpty())
				return;
			for (CustProductApply obj : list) {
				threadPoolTaskExecutor.execute(new CrawleThread(obj));
			}
		} catch (Exception e) {
			log.error(e.getMessage());
		}
	}

	class CrawleThread implements Runnable {
		private CustProductApply obj;
		private Logger logger = LoggerFactory.getLogger(CrawleThread.class);

		public CrawleThread(CustProductApply obj) {
			super();
			this.obj = obj;
		}

		@Override
		public void run() {
			try {
				timeManager.updateCrawlerState(obj);
			} catch (Exception e) {
				logger.error("Exception occured", e);
			}
		}
	}
}
*/